package model

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username string `gorm:"uniqueIndex;size:50"`
	Email    string `gorm:"uniqueIndex;size:100"`
	Password string
	IsActive bool `gorm:"default:true"`
}

// 数据库迁移函数
func AutoMigrate(db *gorm.DB) error {
	return db.AutoMigrate(&User{})
}
